<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>


<c:if test="${applicationScope.listePersonnes == null}">
	<c:import url="${initParam.personnesURL}" var="xml" />
	<x:parse doc="${xml}" var="listePersonnes" scope="application" />
</c:if>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Liste complete
<br/>
<table>
	<x:forEach select="$listePersonnes/personnes/personne" var="personne">
		<tr>
			<td><x:out select="$personne/@id"/></td>
			<td><x:out select="$personne/nom"/></td>
			<td><x:out select="$personne/prenom"/></td>
		</tr>
	</x:forEach>
</table>
<x:set var="unepersonne" select="$listePersonnes/personnes/personne[@id=1]"/>
<x:out select="$unepersonne/nom"/>
</body>
</html>